import request from '~/utils/resquest'

//  回路监控箱-列表
export const hardwareListGet = <T>(params: T) => {
  return request({ url: '/api/gxsaas-assets/hardware/list', method: 'GET', params })
}

//  回路监控箱-删除
export const hardwareRemovePost = <T>(params: T) => {
  return request({ url: '/api/gxsaas-assets/hardware/remove', method: 'POST', params })
}

//  回路监控箱-导出
export const hardwareExportGet = <T>(payload: T) =>
  request({
    url: '/api/gxsaas-assets/hardware/export',
    method: 'GET',
    responseType: 'blob',
    ...payload
  })

//  回路监控箱-模版下载
export const hardwareExportTemplateGet = <T>(payload: T) =>
  request({
    url: '/api/gxsaas-assets/hardwareloop/export-template',
    method: 'GET',
    responseType: 'blob',
    ...payload
  })

// 回路监控箱-导入
export const hardwareImportExcelGet = <T>(params: T) =>
  request({
    url: '/api/gxsaas-assets/hardware/import-excel',
    method: 'post',
    data: params
  })

//  回路监控箱-型号
export const hardwareModelGet = <T>(params: T) => {
  return request({ url: '/api/gxsaas-assets/model/getHardwareModel', method: 'GET', params })
}

//  回路监控箱-详情
export const hardwareViewGet = <T>(params: T) => {
  return request({ url: '/api/gxsaas-assets/hardware/view', method: 'GET', params })
}

//  回路监控箱-新增
export const hardwareAddPost = <T>(data: T) => {
  return request({ url: '/api/gxsaas-assets/hardware/add', method: 'POST', data })
}

//  回路监控箱-修改
export const hardwareUpdatePost = <T>(data: T) => {
  return request({ url: '/api/gxsaas-assets/hardware/update', method: 'POST', data })
}
